C===================================================================
C                                     m
C   Laguerre's polinomials  f(i,n) = L   (dlambda * grid(i))
C                                     n-1
C===================================================================
      subroutine lagpol8 (m, dlambda, f, nload, nmax, grid, nr, pl)
      implicit real*8 (a-h, o-z)
      dimension f(nload, nmax), grid(nr),  pl(nmax)
C
C INPUT:
C -----
C  m - parametr of Laguerre polinomials.
C  nmax  - the max number of n.
C  nload - the first load dimension of f.
C  grid  - "R" - grid of "NR" points.
C
C OUTPUT:
C ------
C  f(i,n) - Laguerre polinomials.
C  pl(nmax) - work space for this programe.
C
      L2 = m - 2
C
C     Loop by  r-grid
C
      do i = 1, nr
         r = grid(i)
         x = dlambda * r
C
C        Define Laguerre's polinomials
C        and store them in array 'f'
C
         pl1    = 1.0d0
         pl(1)  = pl1
         f(i,1) = pl1
c
         if(nmax .gt. 1) then
            pl2    = dble(L2 + 3) - x
            pl(2)  = pl2
            f(i,2) = pl2
c
            do n = 3, nmax
               pl3 = ((dble(2*n-1+L2)-x)*pl2 - dble(n+L2)*pl1) /
     >            dble(n-1)
               pl(n) = pl3
               f(i,n) = pl3
               pl1 = pl2
               pl2 = pl3
            end do
         end if 
      end do 
      return
      end





